package the.workshop.milktea.service;

import org.springframework.stereotype.Service;
import the.workshop.milktea.infrastructure.mapper.DeviceCollectMapper;
import the.workshop.milktea.infrastructure.model.DeviceCollect;
import the.workshop.milktea.interfaces.resp.DeviceCollectReportResp;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeviceCollectService {

    @Resource
    private DeviceCollectMapper deviceCollectMapper;

    public boolean add(DeviceCollect data) {
        deviceCollectMapper.insert(data);
        return true;
    }

    public List<DeviceCollectReportResp> report() {
        return deviceCollectMapper.getReport();
    }
}
